package v1

import (
	"context"
	"google.golang.org/protobuf/types/known/emptypb"
	"log"
	serviceV1 "start/app/user/srv/service/v1"
	pb "start/gen/user/v1"
)

type user struct {
	pb.UnimplementedUserServer

	userService serviceV1.IUser
}

func (_ user) CreateUser(ctx context.Context, createUserMessage *pb.CreateUserMessage) (*emptypb.Empty, error) {
	log.Println("CreateUser ok")
	return new(emptypb.Empty), nil
}

func NewUserServer() pb.UserServer {
	return &user{
		userService: serviceV1.NewUserService(),
	}
}
